Table of Contents

Class: OnceClass .\src\TW\API\Misc.py

A variation on Once that can be used as a metaclass

Usage:

            class outer(object):

                class inner(object):
                    __metaclass__ = OnceClass

                    def __init__(self, obj, instDict, attrName):
                        ...

When anOuterInstance.inner is accessed, an instance of inner will be created and cached in the instance dictionary, as per Once. See Once for more details on the mechanics. The class name will serve as a default attribute name.

Base Classes   
Once
    NamedDescriptor
type
Methods   
__init__
computeValue
copyWithName
  __init__ 
__init__ (
        klass,
        name,
        bases,
        dict,
        )

  computeValue 
computeValue ( self,  *args )

  copyWithName 
copyWithName ( self,  newName )


Table of Contents

This document was automatically generated on Tue Mar 05 10:33:43 2002 by HappyDoc version WORKING